﻿#if UNITY_EDITOR

using UnityEngine;

namespace AI.Graph.Editor {


    public abstract class AbstractNodeView : UnityEditor.Editor, IListIndex {

        /// <summary>
        /// The current index in the canvas list.
        /// </summary>
        public int listIndex { get; set; }

        internal abstract void OnEnable ();

        internal abstract void Initialize (NodeCanvas canvas, AIBehaviour aiBehaviour);

        internal abstract void DrawNode (bool drawSimple);

        internal abstract void DrawOnScene ();


        /// <summary>
        /// Returns the edge point for the given port.
        /// </summary>
        internal abstract EdgePoint GetEdgePointForPort (ConnectionPort port);

    }

    public struct EdgePoint {

        public Vector2 point;
        public Vector2 direction;
        public Color normalColor;
        public Color highlightedColor;


        public EdgePoint (Vector2 point, Vector2 direction, Color normalColor, Color highlightedColor) {
            this.point = point;
            this.direction = direction;
            this.normalColor = normalColor;
            this.highlightedColor = highlightedColor;
        }

    }


}
#endif